package com.demo.design.behavioral.chain.impl;

import com.demo.design.behavioral.chain.Handler;

public class PowerHandler implements Handler {

    private Handler nextHandler;

    @Override
    public Handler setNext(Handler handler) {
        nextHandler = handler;
        return nextHandler;
    }

    @Override
    public void operate() {
        System.err.println("功率数据解析完成");
        if (nextHandler != null) {
            nextHandler.operate();
        }
    }
}
